home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM BV3 / BMUG PD-ROM Version BV3 (CDRM1097900).iso / HyperCard / XCMDs⁄XFCN / Button Builder / Read Me next >
Text File  |  1991-06-29  |  6KB  |  170 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. If you’ve ever needed to make sets of radio buttons or check boxes for a HyperCard stack, you’ve probably run into concerns about making the function of those buttons work correctly. It’s important that such controls work consistently across Macintosh programs, and HyperCard stacks are no exception.
  7.  
  8. The Button Builder can help. It allows you to enter the names of the buttons you need, select button styles and layers, create buttons, and test them to make sure they work the way you expect. You can even paste the completed buttons into your own stacks!
  9.  
  10. Here’s how it works…
  11.  
  12. The Button Builder stack is slightly smaller in size than the 9" Macintosh screen. This allows you to have it open and build buttons while you’re working on your stacks. Here’s how it looks:
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32. To begin, you need to decide what your buttons will be called. Each of the buttons in a set needs to be entered on its own line in the Button Names field. There are 13 lines in the field, so you can have up to 13 buttons in a given set. If button names require more space than the field can hold, continue typing—the letters that doesn’t show up in the field will show up in the finished buttons.
  33.  
  34. After entering the names of the buttons, you have two choices to make: the  layer on which the buttons should be created (card or background) and which style of button you want (radio buttons or check boxes).
  35.  
  36. When you choose to have the buttons built on the card level, the finished buttons will show up on just that card in your stack. Background buttons, on the other hand, will show up on all cards in a stack that share a common background. It’s important that you determine the correct layer when you build your buttons because the scripts behind them are written based on that information. Buttons created for one layer will not work correctly if moved to the other.
  37.  
  38. There are distinct differences between radio buttons and check boxes. The Button Builder makes buttons that work correctly for the choice you make, but it can’t control your making the right choice! If you’re uncertain about which button style to choose, click on the Rules Refresher button for help (or see the Rules Refresher section later in this document).
  39.  
  40. Once you’ve entered button names and made layer and style selections, you can create the buttons by clicking on Make Buttons. The Button Builder will  create the buttons you’ve specified and write the appropriate scripts for them. When completed, the buttons appear in the Finished Buttons area on the right side of the screen.
  41.  
  42. Once the buttons appear, you can click on them to make sure they work the way you expect.
  43.  
  44. The five function buttons perform miscellaneous features of The Button Builder. Make Buttons has already been covered; the functions performed by the other buttons follow…
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. Clear Buttons removes buttons that have been created. It also clears the Button Names field of any button names that might be there. You’ll be asked to verify your request before buttons or names are cleared.
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. Paste to Stack allows you to copy the completed buttons to your own HyperCard stack. When you click on it, a dialog box like this one will appear…
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77. Only HyperCard stacks will appear in this window. Select the stack where you’d like to paste the buttons and click the Open button. The Button Builder will then ask for the number or name of the card where you’d like the buttons placed. Enter that information and click the OK button. The buttons will be copied to the stack you specified on the card you indicated.
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85. Clicking on Stack Help brings up a scrolling window which explains step by step how to use The Button Builder. The help file is reproduced below:
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123. Clicking on Rules Refresher explains the differences between radio buttons and check boxes. This can be useful for those “borderline” situations where you aren’t quite sure which style of button is appropriate. The refresher file is reproduced below:
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144. Using the Buttons in Your Stacks
  145.  
  146. There are a few things you need to know about how The Button Builder scripts work and how you can use the information that buttons track.
  147.  
  148. In radio button sets, a global variable called “activeRadio” keeps track of the currently-active radio button in a set. Each time a different radio button is pushed, the value in activeRadio is changed accordingly.
  149.  
  150. In check box sets, a global variable called “checkedItems” keeps track of all of the boxes which are checked. The checkedItems variable is a comma- delimited list, which means you can easily break it into components using the HyperTalk items function.
  151.  
  152. You can probably see that having more than one set of a particular style of button in the same stack would create problems. The easiest way to remedy this is to change the name of the global variable used to store the information for a particular set of buttons. Don’t forget to declare the appropriate global variable in any handlers you write that need access to button information.
  153.  
  154. Use of The Button Builder
  155.  
  156. The Button Builder is shareware. You may freely distribute it, but be sure to include this documentation file when you do.
  157.  
  158. If you keep The Button Builder and use it, please send the $5 shareware fee to:
  159.  
  160. Doug Moxley
  161. Toucan Software
  162. P.O. Box 17166
  163. Salem  OR   97305
  164.  
  165. Bug reports and suggestions for future enhancements may be sent to the address above, or through the following on-line services…
  166.  
  167. AppleLink: Chemeketa.CC
  168. America Online: Moxley1
  169. GEnie: D.Moxley
  170.